package com.zhuangjie.base.enums;

import com.zhuangjie.mvc.validator.annotate.enum_valid.VerifiableEnum;

/**
 * 收支记录状态枚举
 */
public enum MoneyRecordStatus implements VerifiableEnum {
    WAITING_FOR_ENTRY((byte) 0, "等待入账"),
    ACCOUNTED((byte) 1, "已入账"),
    ENTRY_INTERRUPTED((byte) 2, "入账中断");

    private final byte code;
    private final String name;

    MoneyRecordStatus(byte code, String name) {
        this.code = code;
        this.name = name;
    }

    public byte getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    @Override
    public byte getValue() {
        return getCode();
    }
}